import request from "@/utils/request";

//获取已 app账号 列表
/**
 *
 * @param data { cmch , pageNum, pageSize}
 * @returns {AxiosPromise}
 */
export function getAllAppAccountList(data){
  return request({
    url: '/yxdd/zhgl/list',
    data: data,
    method:'post',
  })
}

/**
 *
 * @param data {
 *   cbid,
 *   cmch,
 *   cnsfjid,
 *   cnsfjurl,
 *   fjids
 *   lxdh
 *   sfzh
 *   sqr
 *   xm
 *   zhglid
 * }
 * @returns {AxiosPromise}
 */
export function openAppAccount(data){
  return request({
    url: '/yxdd/zhgl/insertZhgl',
    data: data,
    method:'post',
  })
}

//ship/checkShip
//目前 只通过 cmch 和cbzt
export function checkShip(data){
  return request({
    url: '/yxdd/ship/checkShip',
    data,
    method:'post',
  })
}

///zhgl/getZhxq  { zhglid}
export function getAppAccountDetail(data){
  return request({
    url:'/yxdd/zhgl/getZhxq',
    data,
    method:'post'
  })
}

///zhgl/resetPwd 重置密码 { zhglid}
export function restAppAccountPwd(data){
  return request({
    url:'/yxdd/zhgl/resetPwd',
    data,
    method:'post'
  })
}
///zhgl/logout { zhglid, zxyy}
export function cancelAppAccount(data){
  return request({
    url:'/yxdd/zhgl/logout',
    data,
    method:'post'
  })
}

